﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestWeb
{
    public partial class Des加密 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string data = "49_13_HG*&IT^_2017-05-08 09:10:57_FEAD775A43C86D73DB83676FD5ACEA4A_1358999C-6082-4CE9-9401-E549D33C2C27";  //要加密的数据  
            data = EncryptTools.EncryptOfDes(data);
            data = HttpUtility.UrlEncode(data);
            Response.Write(data);

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            string data = "YogyTtgNf5NkzPUVo2COJSzTUmC9qW%2bEq0FRja%2fICMrnkfgsLTWFpe%2bTcjhLhm17DemcLofc4PRe9uWdLsveTV8WaPS43LcurMhMkDceO2h7hqA14c8XSOGLvxdM1dBa";  

            data = HttpUtility.UrlDecode(data);
            data = EncryptTools.DecryptOfDes(data);
            Response.Write(data);
        }


    }
}